using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._TradeAreas
{
    /// <summary>
    /// <para>Generate Customer Derived Trade Areas</para>
    /// <para>Creates trade areas around stores based on the number of customers or volume attribute of each customer.</para>
    /// <para>根据每个客户的客户数量或数量属性在商店周围创建贸易区。</para>
    /// </summary>    
    [DisplayName("Generate Customer Derived Trade Areas")]
    public class CustomerDerivedTA : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CustomerDerivedTA()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_stores_layer">
        /// <para>Stores</para>
        /// <para>A point layer representing store or facility locations.</para>
        /// <para>表示商店或设施位置的点图层。</para>
        /// </param>
        /// <param name="_store_id_field">
        /// <para>Store ID Field</para>
        /// <para>The unique ID field representing a store or facility location.</para>
        /// <para>表示商店或设施位置的唯一 ID 字段。</para>
        /// </param>
        /// <param name="_in_customers_layer">
        /// <para>Customers</para>
        /// <para>An input point layer representing customers or patrons.</para>
        /// <para>表示客户或顾客的输入点图层。</para>
        /// </param>
        /// <param name="_link_field">
        /// <para>Associated Store ID Field</para>
        /// <para>An ID field that will be used to assign individual customers to stores.</para>
        /// <para>将用于将单个客户分配到商店的 ID 字段。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output trade area feature class.</para>
        /// <para>输出贸易区要素类。</para>
        /// </param>
        /// <param name="_method">
        /// <para>Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of customer-derived trade area that will be generated.</para>
        ///   <bulletList>
        ///     <bullet_item>Simple—A generalized trade area based on the percentages of customers corresponding to each store will be generated.</bullet_item><para/>
        ///     <bullet_item>Amoeba—Points representing the boundary of the polygon trade area will be connected using natural curvature.</bullet_item><para/>
        ///     <bullet_item>Detailed—Points representing the boundary of the polygon trade area will be connected using straight lines.</bullet_item><para/>
        ///     <bullet_item>Detailed with smoothing—Points representing the boundary of the polygon trade area will be connected with smoothed curves using cubic splines. This approach takes into account the shape and pattern of the customer distributions. This is the default.</bullet_item><para/>
        ///     <bullet_item>Threshold Rings— Concentric rings that expand from input stores until they contain the specified threshold of customers will be generated.</bullet_item><para/>
        ///     <bullet_item>Threshold Drive Times—Polygons that expand from stores along network routes until they contain the specified threshold of customers will be generated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将生成的客户派生贸易区域的类型。</para>
        ///   <bulletList>
        ///     <bullet_item>简单—将生成基于每个商店对应的客户百分比的广义贸易区。</bullet_item><para/>
        ///     <bullet_item>变形虫 - 表示面贸易区边界的点将使用自然曲率进行连接。</bullet_item><para/>
        ///     <bullet_item>详细 - 表示面贸易区边界的点将使用直线进行连接。</bullet_item><para/>
        ///     <bullet_item>使用平滑进行详细说明 - 表示面贸易区边界的点将使用三次样条与平滑曲线连接。此方法考虑了客户分布的形状和模式。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>阈值环 - 将生成从输入存储扩展直到包含指定客户阈值的同心环。</bullet_item><para/>
        ///     <bullet_item>阈值行驶时间 - 将生成从沿网络路径的商店扩展直至包含指定客户阈值的面。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_rings">
        /// <para>Radii (%)</para>
        /// <para>The values that will be used to represent the percentage of customers—for example, total count or a customer attribute and total sales assigned to each store. Each value represents one trade area polygon.</para>
        /// <para>将用于表示客户百分比的值，例如，分配给每个商店的总计数或客户属性和总销售额。每个值表示一个贸易区面。</para>
        /// </param>
        /// <param name="_customer_aggregation_type">
        /// <para>Customer Aggregation Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of aggregation that will be used.</para>
        ///   <bulletList>
        ///     <bullet_item>Count—Percentage-based trade areas will be calculated using the geographic locations of customers. This is the default.</bullet_item><para/>
        ///     <bullet_item>Weight—Percentage-based trade areas will be calculated using a customer attribute—for example, sales.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将使用的聚合类型。</para>
        ///   <bulletList>
        ///     <bullet_item>计数 - 将使用客户的地理位置计算基于百分比的贸易区域。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>权重 - 将使用客户属性（例如销售额）计算基于百分比的贸易区域。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public CustomerDerivedTA(object _in_stores_layer, object _store_id_field, object _in_customers_layer, object _link_field, object _out_feature_class, _method_value _method, List<object> _rings, _customer_aggregation_type_value _customer_aggregation_type)
        {
            this._in_stores_layer = _in_stores_layer;
            this._store_id_field = _store_id_field;
            this._in_customers_layer = _in_customers_layer;
            this._link_field = _link_field;
            this._out_feature_class = _out_feature_class;
            this._method = _method;
            this._rings = _rings;
            this._customer_aggregation_type = _customer_aggregation_type;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Generate Customer Derived Trade Areas";

        public override string CallName => "ba.CustomerDerivedTA";

        public override List<string> AcceptEnvironments => ["baDataSource", "baNetworkSource", "workspace"];

        public override object[] ParameterInfo => [_in_stores_layer, _store_id_field, _in_customers_layer, _link_field, _out_feature_class, _method.GetGPValue(), _rings, _customer_aggregation_type.GetGPValue(), _customer_weight_field, _exclude_outlying_customers.GetGPValue(), _cutoff_distance, _dissolve_option.GetGPValue(), _use_customer_centroids.GetGPValue(), _distance_type, _units, _travel_direction.GetGPValue(), _time_of_day, _time_zone.GetGPValue(), _search_tolerance, _polygon_detail.GetGPValue(), _iterations_limit, _minimum_step, _target_percent_diff];

        /// <summary>
        /// <para>Stores</para>
        /// <para>A point layer representing store or facility locations.</para>
        /// <para>表示商店或设施位置的点图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Stores")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_stores_layer { get; set; }


        /// <summary>
        /// <para>Store ID Field</para>
        /// <para>The unique ID field representing a store or facility location.</para>
        /// <para>表示商店或设施位置的唯一 ID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Store ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _store_id_field { get; set; }


        /// <summary>
        /// <para>Customers</para>
        /// <para>An input point layer representing customers or patrons.</para>
        /// <para>表示客户或顾客的输入点图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Customers")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_customers_layer { get; set; }


        /// <summary>
        /// <para>Associated Store ID Field</para>
        /// <para>An ID field that will be used to assign individual customers to stores.</para>
        /// <para>将用于将单个客户分配到商店的 ID 字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Associated Store ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _link_field { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output trade area feature class.</para>
        /// <para>输出贸易区要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of customer-derived trade area that will be generated.</para>
        ///   <bulletList>
        ///     <bullet_item>Simple—A generalized trade area based on the percentages of customers corresponding to each store will be generated.</bullet_item><para/>
        ///     <bullet_item>Amoeba—Points representing the boundary of the polygon trade area will be connected using natural curvature.</bullet_item><para/>
        ///     <bullet_item>Detailed—Points representing the boundary of the polygon trade area will be connected using straight lines.</bullet_item><para/>
        ///     <bullet_item>Detailed with smoothing—Points representing the boundary of the polygon trade area will be connected with smoothed curves using cubic splines. This approach takes into account the shape and pattern of the customer distributions. This is the default.</bullet_item><para/>
        ///     <bullet_item>Threshold Rings— Concentric rings that expand from input stores until they contain the specified threshold of customers will be generated.</bullet_item><para/>
        ///     <bullet_item>Threshold Drive Times—Polygons that expand from stores along network routes until they contain the specified threshold of customers will be generated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将生成的客户派生贸易区域的类型。</para>
        ///   <bulletList>
        ///     <bullet_item>简单—将生成基于每个商店对应的客户百分比的广义贸易区。</bullet_item><para/>
        ///     <bullet_item>变形虫 - 表示面贸易区边界的点将使用自然曲率进行连接。</bullet_item><para/>
        ///     <bullet_item>详细 - 表示面贸易区边界的点将使用直线进行连接。</bullet_item><para/>
        ///     <bullet_item>使用平滑进行详细说明 - 表示面贸易区边界的点将使用三次样条与平滑曲线连接。此方法考虑了客户分布的形状和模式。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>阈值环 - 将生成从输入存储扩展直到包含指定客户阈值的同心环。</bullet_item><para/>
        ///     <bullet_item>阈值行驶时间 - 将生成从沿网络路径的商店扩展直至包含指定客户阈值的面。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Method")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _method_value _method { get; set; }

        public enum _method_value
        {
            /// <summary>
            /// <para>Simple</para>
            /// <para>Simple—A generalized trade area based on the percentages of customers corresponding to each store will be generated.</para>
            /// <para>简单—将生成基于每个商店对应的客户百分比的广义贸易区。</para>
            /// </summary>
            [Description("Simple")]
            [GPEnumValue("SIMPLE")]
            _SIMPLE,

            /// <summary>
            /// <para>Amoeba</para>
            /// <para>Amoeba—Points representing the boundary of the polygon trade area will be connected using natural curvature.</para>
            /// <para>变形虫 - 表示面贸易区边界的点将使用自然曲率进行连接。</para>
            /// </summary>
            [Description("Amoeba")]
            [GPEnumValue("AMOEBA")]
            _AMOEBA,

            /// <summary>
            /// <para>Detailed</para>
            /// <para>Detailed—Points representing the boundary of the polygon trade area will be connected using straight lines.</para>
            /// <para>详细 - 表示面贸易区边界的点将使用直线进行连接。</para>
            /// </summary>
            [Description("Detailed")]
            [GPEnumValue("DETAILED")]
            _DETAILED,

            /// <summary>
            /// <para>Detailed with smoothing</para>
            /// <para>Detailed with smoothing—Points representing the boundary of the polygon trade area will be connected with smoothed curves using cubic splines. This approach takes into account the shape and pattern of the customer distributions. This is the default.</para>
            /// <para>使用平滑进行详细说明 - 表示面贸易区边界的点将使用三次样条与平滑曲线连接。此方法考虑了客户分布的形状和模式。这是默认设置。</para>
            /// </summary>
            [Description("Detailed with smoothing")]
            [GPEnumValue("DETAILED_WITH_SMOOTHING")]
            _DETAILED_WITH_SMOOTHING,

            /// <summary>
            /// <para>Threshold Rings</para>
            /// <para>Threshold Rings— Concentric rings that expand from input stores until they contain the specified threshold of customers will be generated.</para>
            /// <para>阈值环 - 将生成从输入存储扩展直到包含指定客户阈值的同心环。</para>
            /// </summary>
            [Description("Threshold Rings")]
            [GPEnumValue("THRESHOLD_RINGS")]
            _THRESHOLD_RINGS,

            /// <summary>
            /// <para>Threshold Drive Times</para>
            /// <para>Threshold Drive Times—Polygons that expand from stores along network routes until they contain the specified threshold of customers will be generated.</para>
            /// <para>阈值行驶时间 - 将生成从沿网络路径的商店扩展直至包含指定客户阈值的面。</para>
            /// </summary>
            [Description("Threshold Drive Times")]
            [GPEnumValue("THRESHOLD_DRIVETIMES")]
            _THRESHOLD_DRIVETIMES,

        }

        /// <summary>
        /// <para>Radii (%)</para>
        /// <para>The values that will be used to represent the percentage of customers—for example, total count or a customer attribute and total sales assigned to each store. Each value represents one trade area polygon.</para>
        /// <para>将用于表示客户百分比的值，例如，分配给每个商店的总计数或客户属性和总销售额。每个值表示一个贸易区面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Radii (%)")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _rings { get; set; }


        /// <summary>
        /// <para>Customer Aggregation Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of aggregation that will be used.</para>
        ///   <bulletList>
        ///     <bullet_item>Count—Percentage-based trade areas will be calculated using the geographic locations of customers. This is the default.</bullet_item><para/>
        ///     <bullet_item>Weight—Percentage-based trade areas will be calculated using a customer attribute—for example, sales.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将使用的聚合类型。</para>
        ///   <bulletList>
        ///     <bullet_item>计数 - 将使用客户的地理位置计算基于百分比的贸易区域。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>权重 - 将使用客户属性（例如销售额）计算基于百分比的贸易区域。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Customer Aggregation Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _customer_aggregation_type_value _customer_aggregation_type { get; set; }

        public enum _customer_aggregation_type_value
        {
            /// <summary>
            /// <para>Count</para>
            /// <para>Count—Percentage-based trade areas will be calculated using the geographic locations of customers. This is the default.</para>
            /// <para>计数 - 将使用客户的地理位置计算基于百分比的贸易区域。这是默认设置。</para>
            /// </summary>
            [Description("Count")]
            [GPEnumValue("COUNT")]
            _COUNT,

            /// <summary>
            /// <para>Weight</para>
            /// <para>Weight—Percentage-based trade areas will be calculated using a customer attribute—for example, sales.</para>
            /// <para>权重 - 将使用客户属性（例如销售额）计算基于百分比的贸易区域。</para>
            /// </summary>
            [Description("Weight")]
            [GPEnumValue("WEIGHT")]
            _WEIGHT,

        }

        /// <summary>
        /// <para>Customer Weight Field</para>
        /// <para>The field that will be used to calculate the trade areas. This is based on either the number of customers (count) or the calculated weighted value assigned to each customer.</para>
        /// <para>将用于计算贸易区域的字段。这基于客户数量（计数）或分配给每个客户的计算加权值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Customer Weight Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _customer_weight_field { get; set; } = null;


        /// <summary>
        /// <para>Exclude Outlying Customers</para>
        /// <para><xdoc>
        ///   <para>Specifies whether outlying customers will be excluded from the trade area generation.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Outlying customers will be excluded.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Outlying customers will not be excluded; all customers will be considered. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将外围客户排除在贸易区生成之外。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将排除外围客户。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会排除外围客户;所有客户都将被考虑在内。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Exclude Outlying Customers")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _exclude_outlying_customers_value _exclude_outlying_customers { get; set; } = _exclude_outlying_customers_value._false;

        public enum _exclude_outlying_customers_value
        {
            /// <summary>
            /// <para>EXCLUDE_OUTLIERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EXCLUDE_OUTLIERS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>ALL_POINTS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ALL_POINTS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Cut-off Distance</para>
        /// <para>The distance beyond which customers will be considered outliers and excluded from consideration during trade area generation.</para>
        /// <para>在贸易区生成期间，客户将被视为异常值并被排除在考虑因素之外的距离。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cut-off Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _cutoff_distance { get; set; } = null;


        /// <summary>
        /// <para>Dissolve Option</para>
        /// <para><xdoc>
        ///   <para>Specifies whether polygons of the entire area will be created or the polygons will be split into individual features.</para>
        ///   <bulletList>
        ///     <bullet_item>Overlap— Output polygons will be generated in which each feature begins at zero and grows to satisfy the specified percentage of customers. For example, if you specify a trade area of 50 percent and 70 percent of your customers, one polygon will be generated to include 0 to 50 percent and a second polygon will include all 0 to 70 percent of customers. This is the default.</bullet_item><para/>
        ///     <bullet_item>Split— Output polygons will be generated for individual features based on the specified percentage breaks. For example, if you specify a trade area of 50 percent and 70 percent of your customers, one polygon will be generated to include 0 to 50 percent and a second polygon will include 50 to 70 percent of customers.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是创建整个区域的面，还是将面分割为单个要素。</para>
        ///   <bulletList>
        ///     <bullet_item>重叠 - 将生成输出面，其中每个要素从零开始，并逐渐增长以满足指定百分比的客户。例如，如果指定 50% 和 70% 客户的贸易区域，则将生成一个多边形以包括 0% 到 50%，第二个多边形将包括所有 0% 到 70% 的客户。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>分割- 将根据指定的百分比中断为各个要素生成输出面。例如，如果指定 50% 和 70% 客户的贸易区域，则将生成一个面以包括 0% 到 50%，第二个面将包括 50% 到 70% 的客户。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dissolve Option")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _dissolve_option_value _dissolve_option { get; set; } = _dissolve_option_value._OVERLAP;

        public enum _dissolve_option_value
        {
            /// <summary>
            /// <para>Overlap</para>
            /// <para>Overlap— Output polygons will be generated in which each feature begins at zero and grows to satisfy the specified percentage of customers. For example, if you specify a trade area of 50 percent and 70 percent of your customers, one polygon will be generated to include 0 to 50 percent and a second polygon will include all 0 to 70 percent of customers. This is the default.</para>
            /// <para>重叠 - 将生成输出面，其中每个要素从零开始，并逐渐增长以满足指定百分比的客户。例如，如果指定 50% 和 70% 客户的贸易区域，则将生成一个多边形以包括 0% 到 50%，第二个多边形将包括所有 0% 到 70% 的客户。这是默认设置。</para>
            /// </summary>
            [Description("Overlap")]
            [GPEnumValue("OVERLAP")]
            _OVERLAP,

            /// <summary>
            /// <para>Split</para>
            /// <para>Split— Output polygons will be generated for individual features based on the specified percentage breaks. For example, if you specify a trade area of 50 percent and 70 percent of your customers, one polygon will be generated to include 0 to 50 percent and a second polygon will include 50 to 70 percent of customers.</para>
            /// <para>分割- 将根据指定的百分比中断为各个要素生成输出面。例如，如果指定 50% 和 70% 客户的贸易区域，则将生成一个面以包括 0% 到 50%，第二个面将包括 50% 到 70% 的客户。</para>
            /// </summary>
            [Description("Split")]
            [GPEnumValue("SPLIT")]
            _SPLIT,

        }

        /// <summary>
        /// <para>Use Customers Centroid for Trade Area Center</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the centroid of your customer area will be used to calculate trade areas outward from this point.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The centroid of customer points will be used to calculate trade areas.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The centroid of customer points will not be used; store location will be used as the starting point to calculate trade areas. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否使用客户区域的质心从该点向外计算贸易区域。</para>
        ///   <bulletList>
        ///     <bullet_item>选中—客户点的质心将用于计算贸易区。</bullet_item><para/>
        ///     <bullet_item>未选中—将不使用客户点的质心;商店位置将用作计算贸易区域的起点。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Use Customers Centroid for Trade Area Center")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _use_customer_centroids_value _use_customer_centroids { get; set; } = _use_customer_centroids_value._false;

        public enum _use_customer_centroids_value
        {
            /// <summary>
            /// <para>USE_CENTROIDS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("USE_CENTROIDS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>USE_STORES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("USE_STORES")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Distance Type</para>
        /// <para>The method of travel that will be used to calculate the distance.</para>
        /// <para>将用于计算距离的旅行方法。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _distance_type { get; set; } = null;


        /// <summary>
        /// <para>Distance Units</para>
        /// <para>The units that will be used for the distance values.</para>
        /// <para>将用于距离值的单位。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _units { get; set; } = null;


        /// <summary>
        /// <para>Travel Direction</para>
        /// <para><xdoc>
        ///   <para>Specifies the direction of travel that will be used between stores and customers.</para>
        ///   <bulletList>
        ///     <bullet_item>Toward Stores—The direction of travel will be from customers to stores. This is the default.</bullet_item><para/>
        ///     <bullet_item>Away from Stores—The direction of travel will be from stores to customers.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定商店和客户之间将使用的行进方向。</para>
        ///   <bulletList>
        ///     <bullet_item>朝向商店 - 行进方向将从客户到商店。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>远离商店 - 行进方向将从商店到客户。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Travel Direction")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _travel_direction_value _travel_direction { get; set; } = _travel_direction_value._TOWARD_STORES;

        public enum _travel_direction_value
        {
            /// <summary>
            /// <para>Toward Stores</para>
            /// <para>Toward Stores—The direction of travel will be from customers to stores. This is the default.</para>
            /// <para>朝向商店 - 行进方向将从客户到商店。这是默认设置。</para>
            /// </summary>
            [Description("Toward Stores")]
            [GPEnumValue("TOWARD_STORES")]
            _TOWARD_STORES,

            /// <summary>
            /// <para>Away from Stores</para>
            /// <para>Away from Stores—The direction of travel will be from stores to customers.</para>
            /// <para>远离商店 - 行进方向将从商店到客户。</para>
            /// </summary>
            [Description("Away from Stores")]
            [GPEnumValue("AWAY_FROM_STORES")]
            _AWAY_FROM_STORES,

        }

        /// <summary>
        /// <para>Time of Day</para>
        /// <para>The time and date that will be used when calculating distance.</para>
        /// <para>计算距离时将使用的时间和日期。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time of Day")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_of_day { get; set; } = null;


        /// <summary>
        /// <para>Time Zone</para>
        /// <para><xdoc>
        ///   <para>Specifies the time zone that will be used for the Time of Day parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>Time Zone at Location—The time zone in which the territories are located will be used. This is the default.</bullet_item><para/>
        ///     <bullet_item>UTC—Coordinated universal time (UTC) will be used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于“时间”参数的时区。</para>
        ///   <bulletList>
        ///     <bullet_item>位置时区—将使用区域所在的时区。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>UTC—将使用协调世界时 （UTC）。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Zone")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _time_zone_value _time_zone { get; set; } = _time_zone_value._TIME_ZONE_AT_LOCATION;

        public enum _time_zone_value
        {
            /// <summary>
            /// <para>UTC</para>
            /// <para>UTC—Coordinated universal time (UTC) will be used.</para>
            /// <para>UTC—将使用协调世界时 （UTC）。</para>
            /// </summary>
            [Description("UTC")]
            [GPEnumValue("UTC")]
            _UTC,

            /// <summary>
            /// <para>Time Zone at Location</para>
            /// <para>Time Zone at Location—The time zone in which the territories are located will be used. This is the default.</para>
            /// <para>位置时区—将使用区域所在的时区。这是默认设置。</para>
            /// </summary>
            [Description("Time Zone at Location")]
            [GPEnumValue("TIME_ZONE_AT_LOCATION")]
            _TIME_ZONE_AT_LOCATION,

        }

        /// <summary>
        /// <para>Search Tolerance</para>
        /// <para><xdoc>
        ///   <para>The maximum distance that input points can be from the network. Points located beyond the search tolerance will be excluded from processing.</para>
        ///   <para>The parameter requires a distance value and units for the tolerance.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入点与网络的最大距离。超出搜索容差范围的点将被排除在处理范围之外。</para>
        ///   <para>该参数需要距离值和公差单位。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _search_tolerance { get; set; } = null;


        /// <summary>
        /// <para>Polygon Detail</para>
        /// <para><xdoc>
        ///   <para>Specifies the level of detail that will be used for the output drive time polygons.</para>
        ///   <bulletList>
        ///     <bullet_item>Standard— Polygons with a standard level of detail will be created. This is the default.</bullet_item><para/>
        ///     <bullet_item>Generalized—Generalized polygons will be created using the hierarchy present in the network data source to produce results quickly.</bullet_item><para/>
        ///     <bullet_item>High— Polygons with a high level of detail will be created for applications in which precise results are important.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于输出行驶时间多边形的细节级别。</para>
        ///   <bulletList>
        ///     <bullet_item>标准 - 将创建具有标准细节级别的面。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>广义—将使用网络数据源中存在的层次结构创建广义面，以快速生成结果。</bullet_item><para/>
        ///     <bullet_item>高 - 将为精确结果很重要的应用程序创建具有高细节级别的多边形。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Polygon Detail")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _polygon_detail_value _polygon_detail { get; set; } = _polygon_detail_value._STANDARD;

        public enum _polygon_detail_value
        {
            /// <summary>
            /// <para>Standard</para>
            /// <para>Standard— Polygons with a standard level of detail will be created. This is the default.</para>
            /// <para>标准 - 将创建具有标准细节级别的面。这是默认设置。</para>
            /// </summary>
            [Description("Standard")]
            [GPEnumValue("STANDARD")]
            _STANDARD,

            /// <summary>
            /// <para>Generalized</para>
            /// <para>Generalized—Generalized polygons will be created using the hierarchy present in the network data source to produce results quickly.</para>
            /// <para>广义—将使用网络数据源中存在的层次结构创建广义面，以快速生成结果。</para>
            /// </summary>
            [Description("Generalized")]
            [GPEnumValue("GENERALIZED")]
            _GENERALIZED,

            /// <summary>
            /// <para>High</para>
            /// <para>High— Polygons with a high level of detail will be created for applications in which precise results are important.</para>
            /// <para>高 - 将为精确结果很重要的应用程序创建具有高细节级别的多边形。</para>
            /// </summary>
            [Description("High")]
            [GPEnumValue("HIGH")]
            _HIGH,

        }

        /// <summary>
        /// <para>Iterations Limit</para>
        /// <para>Restricts the number of drive times that can be used to find the optimal threshold limit.</para>
        /// <para>限制可用于查找最佳阈值限制的行驶次数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Iterations Limit")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _iterations_limit { get; set; } = null;


        /// <summary>
        /// <para>Minimum Step</para>
        /// <para>The minimum increment distance or time—for example, 1 mile or 1 minute—that will be used between iterations to expand until the threshold is reached.</para>
        /// <para>最小增量距离或时间（例如，1 英里或 1 分钟），将在迭代之间用于扩展，直到达到阈值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Step")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _minimum_step { get; set; } = null;


        /// <summary>
        /// <para>Threshold Percent Difference</para>
        /// <para>The maximum percentage difference between the target value and threshold value that will be used when determining the threshold drive time, for example, 5 percent. The default value is 5.</para>
        /// <para>确定阈值行驶时间时将使用的目标值和阈值之间的最大百分比差，例如 5%。默认值为 5。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Threshold Percent Difference")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _target_percent_diff { get; set; } = 5;


        public CustomerDerivedTA SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}